package com.love.rongapi.constant;

import com.love.rongcommon.exception.ErrorEnum;

public enum ApiEnum implements ErrorEnum {
    TOKEN_NOT_EXISTS(100000, "accessToken不存在"),
    TOKEN_ERROR(100001, "accessToken有误"),

    USER_EXISTS(100100, "用户已存在"),
    USER_NOT_EXISTS(100101, "用户不存在"),
    MOBILE_EXISTS(100102, "手机号码已存在"),
    USER_DISABLE(100103, "用户已失效"),

    FAILED_SAVE(100200, "保存失败"),
    FAILED_UPDATE(100201, "更新失败"),
    FAILED_DELETE(100202, "删除失败"),
    ;

    private int code;
    private String message;

    ApiEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public int getCode() {
        return this.code;
    }

    @Override
    public String getMsg() {
        return this.message;
    }
}
